Skip to content

fix(editor): align OXC formatter config with vite.config.ts#862

Merged
fengmk2 merged 2 commits intovoidzero-dev:mainfrom
GGGLHHH:codex/fix-editor-format-config
Mar 14, 2026
Merged

fix(editor): align OXC formatter config with vite.config.ts#862
fengmk2 merged 2 commits intovoidzero-dev:mainfrom
GGGLHHH:codex/fix-editor-format-config

Conversation

@GGGLHHH
Copy link
Copy Markdown
Contributor

@GGGLHHH GGGLHHH commented Mar 14, 2026

Summary

  • point generated editor formatter config at ./vite.config.ts for VS Code and Zed
  • document the same setup in the IDE integration and formatter guides
  • add a focused test covering generated editor config output

Why

This fixes the config drift described in #861, where vp fmt / vp check --fix read the fmt block from vite.config.ts, but editor format-on-save could still use a different formatter config source.

Oxfmt already supports loading formatter settings from vite.config.ts through fmt.configPath, so the editor setup can use the same single source of truth instead of requiring a separate .oxfmtrc.json.

Testing

  • local project verification: confirmed that vp fmt applies singleQuote: true when formatting from vite.config.ts
  • repository test run: not completed in this clone because vp install currently fails before dependency setup due missing rolldown-vite/patches/* files in the public checkout

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 14, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 1e36cb1
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69b561d6a567a30008f2b51f

@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Mar 14, 2026

@GGGLHHH Thanks!

@fengmk2 fengmk2 merged commit cb52c0b into voidzero-dev:main Mar 14, 2026
21 checks passed
@milksense
Copy link
Copy Markdown

milksense commented Mar 18, 2026

@fengmk2 publish docs asap cause editor can't format any files at this moment

We do not recommend using .oxfmtrc.json with Vite+.

VITE+ - The Unified Toolchain for the Web

vp v0.1.12

Local vite-plus:
  vite-plus  v0.1.13-alpha.1

Tools:
  vite             v8.0.0
  rolldown         v1.0.0-rc.9
  vitest           v4.1.0
  oxfmt            v0.41.0
  oxlint           v1.56.0
  oxlint-tsgolint  v0.17.0
  tsdown           v0.21.4

Environment:
  Package manager  Not found
  Node.js          v24.14.0 (.node-version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor format on save does not stay in sync with fmt config from vite.config.ts

3 participants